package com.smart.es.controller;

import com.smart.es.entity.Product;
import com.smart.es.service.ProductService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/product/search")
public class ProductController {
    @Resource
    ProductService productService;

    @GetMapping("/list")
    public List<Product> list(int page, int size, String name, String title) {
        return productService.list(page, size, name, title);
    }
}
